
$(document).ready(function($) {
    "use strict";

    $(window).ready(function () {
        $('.loader-box').fadeOut();
    });

    new WOW().init();

    $('.banner-slider').slick({
        infinite: true,
        slidesToShow: 1,
        slidesToScroll: 1,
        prevArrow: false,
        nextArrow: false,
        dots: false,
        autoplay: true,
        autoplaySpeed: 5000,
	  speed: 1000,
	  fade: true,
	  cssEase: 'linear'
	});

	$('.instagram-slider').slick({
	  infinite: true,
	  slidesToShow: 6,
	  slidesToScroll: 1,
	  prevArrow: false,
	  nextArrow: false,
	  autoplay: true,
  	  autoplaySpeed: 2000,
  	  responsive: [
  	  {
  	  	breakpoint: 1500,
  	  	settings: {
  	  		slidesToShow: 5
  	  	}
  	  },
  	  {
  	  	breakpoint: 1400,
  	  	settings: {
  	  		slidesToShow: 4
  	  	}
  	  },
  	  {
  	  	breakpoint: 992,
  	  	settings: {
  	  		slidesToShow: 3
  	  	}
  	  },
  	  {
  	  	breakpoint: 768,
  	  	settings: {
  	  		slidesToShow: 2
  	  	}
  	  },
  	  {
  	  	breakpoint: 576,
  	  	settings: {
  	  		slidesToShow: 1
  	  	}
  	  }
    ]	
	});

	$('.chefs-slider').slick({
	  infinite: true,
	  slidesToShow: 3,
	  slidesToScroll: 1,
	  prevArrow: false,
	  nextArrow: false,
	  dots: true,
	  autoplay: false,
  	  autoplaySpeed: 2000,	
  	  responsive: [
  	  {
  	  	breakpoint: 992,
  	  	settings: {
  	  		slidesToShow: 2
  	  	}
  	  },
  	  {
  	  	breakpoint: 768,
  	  	settings: {
  	  		slidesToShow: 1
  	  	}
  	  },
  	  {
  	  	breakpoint: 576,
  	  	settings: {
  	  		slidesToShow: 1
  	  	}
  	  }
    ]
	});

	$('.testimonial-slider').slick({
	  centerMode: true,
	  infinite: true,
	  slidesToShow: 3,
	  slidesToScroll: 1,
	  prevArrow: false,
	  nextArrow: false,
	  dots: true,
	  autoplay: true,
  	  autoplaySpeed: 2000,
  	  responsive: [
  	  {
  	  	breakpoint: 992,
  	  	settings: {
  	  		slidesToShow: 1
  	  	}
  	  }
    ]	
	});

	$( '.menu-item a, .scroll-down a, #scroll-top, .footer-menu ul li a' ).on( 'click', function(e){		
	  var href = $(this).attr( 'href' );	  
	  $( 'html, body' ).animate({
			scrollTop: $( href ).offset().top
	  }, '800' );
	  e.preventDefault();

	});

	$(window).on( 'scroll', function() {
	  if ($(window).scrollTop() > 300) {
	    $("#scroll-top").fadeIn('500');
	  } else {
	    $("#scroll-top").fadeOut('500');
	  }
	});

	$(window).on( 'scroll', function(){
	  if ($(window).scrollTop() >= 200) {
	    $('.site-header').addClass('sticky-header');
	   }
	   else {
	    $('.site-header').removeClass('sticky-header');
	   }
	});

	$(".toggle-button").on( 'click', function(){
		$(".main-navigation").toggleClass('toggle-menu');
		$(".black-shadow").fadeToggle();
	});
	$(".menu-item a").on( 'click', function(){
		$(".main-navigation").removeClass('toggle-menu');
		$(".black-shadow").fadeOut();
	});
	$(".black-shadow").on( 'click', function(){
		$(this).fadeOut();
		$(".main-navigation").removeClass('toggle-menu');
	});

	if ($(window).width() < 992) {
	   $('.blog-slider').slick({
		  infinite: true,
		  slidesToShow: 2,
		  slidesToScroll: 1,
		  prevArrow: false,
		  nextArrow: false,
		  dots: true,
		  autoplay: false,
	  	  autoplaySpeed: 2000,	
	  	  responsive: [
	  	  {
	  	  	breakpoint: 768,
	  	  	settings: {
	  	  		slidesToShow: 1
	  	  	}
	  	  }
	    ]
		});
	}

    $('#datepicker').datetimepicker({
		format: 'DD/MM/YYYY',
		minDate: new Date(),
	});

	$('#timepicker').datetimepicker({
	 	format: 'hh:mm A',
	});

});